from prompt_toolkit import prompt
from prompt_toolkit.completion import WordCompleter

# 定义一个自动补全的单词列表
animal_completer = WordCompleter(['dog', 'cat', 'bird', 'mouse'])

# 使用自动补全功能提示用户输入
animal = prompt('Enter an animal: ', completer=animal_completer)
print(f'You entered: {animal}')
